package com.chang.soul.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Id;
import java.text.SimpleDateFormat;
import java.util.Date;

/***
 * @author LiHanChang
 */
@Data
@ApiModel(value = "文章表",description = "")
public class ArticleBean {

    @Id
    @ApiModelProperty(value = "主键id UUID*")
    private int id;

    @ApiModelProperty(value = "标题*")
    private String Title;

    @ApiModelProperty(value = "分类*")
    private int Types;

    @ApiModelProperty(value = "作者*")
    private String Author;

    @ApiModelProperty(value = "创建时间*")
    private String CreateTime;

    @ApiModelProperty(value = "更新时间*")
    private String UpdateTime;

    @ApiModelProperty(value = "文章内容*")
    private String Content;

    @ApiModelProperty(value = "浏览量*")
    private int PageViews;

//    public String getCreateTime(){
//        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
//        System.out.println(df.format(new Date()));
//        return df.format(new Date());
//    }
//    public void setCreateTime(String createTime){
//        this.CreateTime = createTime;
//    }
}
